package DB.Evento;

public abstract class EventoTable {

    private static final String INT_TYPE = " INT";
    private static final String TEXT_TYPE = " TEXT";
    private static final String REAL_TYPE = " REAL";
    private static final String COMMA_SEP = ", ";
    private static final String NOT_NULL = " NOT NULL ";
    
    public static final String TABLE_NAME = "eventos";
    
    public static final String COLUMN_ID = "id";
    public static final String COLUMN_NOME = "nome";
    public static final String COLUMN_DESCRICAO = "descricao";
    public static final String COLUMN_VALOR = "valor";
    public static final String COLUMN_VAGAS = "vagas";
    public static final String COLUMN_DATAEVENTO = "dataEvento";
    public static final String COLUMN_INICIOINSCRICOES = "inicioInscricoes";
    public static final String COLUMN_FIMINSCRICOES = "fimInscricoes";
    public static final String COLUMN_ENDERECO = "endereco";
    public static final String COLUMN_CIDADE = "cidade";
    public static final String COLUMN_ESTADO = "estado";
    public static final String COLUMN_PAIS = "pais";
    public static final String COLUMN_CEP = "cep";
    
    public static final String[] allColumns = { COLUMN_ID, COLUMN_NOME, COLUMN_VALOR, COLUMN_VAGAS, COLUMN_DATAEVENTO, COLUMN_INICIOINSCRICOES, COLUMN_FIMINSCRICOES };
    
    public static final String TABLE_CREATE =
            "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + "("
            + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT" + COMMA_SEP
            + COLUMN_NOME + TEXT_TYPE + COMMA_SEP
            + COLUMN_DESCRICAO + TEXT_TYPE + COMMA_SEP
            + COLUMN_VALOR + REAL_TYPE + COMMA_SEP
            + COLUMN_VAGAS + INT_TYPE + COMMA_SEP
            + COLUMN_DATAEVENTO + INT_TYPE + COMMA_SEP
            + COLUMN_INICIOINSCRICOES + INT_TYPE + COMMA_SEP
            + COLUMN_FIMINSCRICOES + INT_TYPE + COMMA_SEP
            + COLUMN_ENDERECO + TEXT_TYPE + COMMA_SEP
            + COLUMN_CIDADE + TEXT_TYPE + COMMA_SEP
            + COLUMN_ESTADO + TEXT_TYPE + COMMA_SEP
            + COLUMN_PAIS + TEXT_TYPE + COMMA_SEP
            + COLUMN_CEP + TEXT_TYPE + ");";
    
    public static final String DELETE_ALL = "DELETE FROM " + TABLE_NAME;
}
